/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 29489
 * Date: 2023-03-16
 * Time: 16:52
 */
public class Schedule {
    private Student[] stuList;//学生列表
    private Course[] cList;//课程列表
    private int schNum = 0;//学生选课总数

    public Schedule(){
        stuList = new Student[100];
        cList = new Course[20];
    }

    public void setSchNum(int schNum) {
        this.schNum = schNum;
    }

    public int GetSchNum(){
        return schNum;
    }
    public void addCourse(Student stu, Course course){
        stuList[schNum] = stu;
        cList[schNum] = course;
        ++schNum;
    }
    public void displayCourse(){
        for(int i = 0; i < schNum; ++i){
            //System.out.println(stuList[i].toString()+"\t"+cList[i].toString());
            System.out.println(stuList[i].getStuID()+"\t"+stuList[i].getStuName()+"\t"
            +cList[i].getcID()+"\t"+cList[i].getcName());
        }
    }
}
